package com.zwd.cases.demo.gof23.strategy.demo1;

/**
 * @Description 上下文
 * @Author zhengwd
 * @Date 2023/4/12 20:23
 **/
public class Content {

    Strategy strategy;

    /**
     * 初始化时传入具体的策略对象
     * @param strategy
     */
    public Content(Strategy strategy) {
        this.strategy = strategy;
    }

    /**
     * 上下文接口
     */
    public void contextInterface() {
        strategy.algorithmInterface();
    }

}
